<?php

/**
 * JingYao-backend
 *
 * @link     https://gitee.com/wang-zhihui-release/jingyao-backend
 * @apiDocument https://gitee.com/wang-zhihui-release/jingyao-backend/wikis/
 */

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateGridsTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('grids', function (Blueprint $table) {
            $table->id();

            $table->tinyInteger('type')->default(0)->comment('几级网格');
            $table->string('administrator')->default('')->comment('网格长');
            $table->string('title')->default('')->comment('例: 居民一期: 一片区');
            $table->string('party_administrator')->default('')->comment('党建指导员');
            $table->string('village_leader')->default('')->comment('村民小组长');
            $table->string('flow_administrator')->default('')->comment('流管员');
            $table->string('region_leader')->default('')->comment('包片干部');
            /*
            $table->string('name')->comment('人员姓名');
            $table->string('grid_level')->comment('网格级别');
            $table->string('user_level')->comment('人员职级');
            $table->string('region')->nullable()->comment('所属片区');
            */
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('grids');
    }
}
